package cn.sinobest.pe;

import cn.com.hnisi.framework.util.Configuration;

public class ExcutorService implements Runnable {


	
	public static void main(String [] args){
		if(args.length<2){
			System.out.println("Usage: (rpcPort, octopusPort, workerId)");
			return;
		} 
		
		System.setProperty("workerRpcPort", args[0]);
		System.setProperty("octopusPort", args[1]);
		System.setProperty("KETTLE_SYSTEM_HOSTNAME", args[2]);
		new Thread(new ExcutorService()).start();
	}
	
	
	public void run() {
		try {
			Excutor handler = ExcutorFactory.create(Configuration.getInstanceLocal());
//			handler.setDaemon(true);
			handler.start();
	    } catch (Exception e) {
	      e.printStackTrace();
	      System.exit(9);
	    }
		
	}
}
